package com.kkb.service;

import com.kkb.mapper.AdminsMapper;
import com.kkb.pojo.Admins;
import com.kkb.vo.LoginNameAndPwd;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;

import javax.annotation.Resource;

@Service
public class AdminService {

    @Resource
    private AdminsMapper adminsMapper;

    @Transactional(propagation = Propagation.REQUIRED,rollbackFor = {Exception.class})
    public Admins selectByLogNameAndPwd(LoginNameAndPwd lp){

        return adminsMapper.selectByLogNameAndPwd(lp);
    }
}
